<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html">

  <ui:composition template="/WEB-INF/layout/template.xhtml">
    
    <ui:define name="body">
      <h:form>
        <h:panelGrid columns="2">
          <h:outputText value="Username"/>
          <h:inputText value="#{loginBean.username}"/>
          
          <h:outputText value="Password"/>
          <h:inputSecret value="#{loginBean.password}"/>
          
          <h:commandButton value="Login" actionListener="#{loginBean.login}"/>
        </h:panelGrid>
      </h:form>
      
      <h:outputText rendered="#{param.login_error==1}" value="Incorrect username and/or password."/>
      <ui:debug hotkey="p"/>
    </ui:define>
  </ui:composition>
</html>

